class Employee:
  def __init__(self, name, age, salary):
    self.name = name
    self.age = age
    self.salary = salary

  def work(self):
    print("完成工作")


class Manager(Employee):
  def __init__(self, name, age, salary, team):
    super().__init__(name, age, salary)
    self.team = team
    self.worker = []

  def work(self):
    super(Manager, self).work()

  def manage(self):
    print("管理员工")

  def display_worker(self):
    for w in self.worker:
      print(w.name)

  def add_dev(self, employee):
    self.worker.append(employee)

class Developer(Employee):
  def __init__(self, name, age, salary, skill):
    super().__init__(name, age, salary)
    self.skill = skill

  def work(self):
    super(Employee).work()
    print(self.skill)

  def show_code_skill(self):
    print(f"{self.name}所掌握的编程语言是{self.skill}")

d1 = Developer("Grace", 22, 8000, "Python")
d1.show_code_skill()

m1 = Manager("Caesar", 35, 30000, "Ferrari")
m1.add_dev(d1)
m1.display_worker()


